1. Field of the Invention
The present invention relates to a system, method, program, and data structure for selecting a preferred path to a storage device and, in particular, providing path information indicating a preferred controller and non-preferred controller that can be used to access the storage device.
2. Description of the Related Art
In prior art storage systems, one or more host computers access a storage space maintained in a storage device through a storage controller. In mass storage systems, the storage device may comprise one or more Direct Access Storage Devices (DASDs), comprised of interconnected hard disk drives. The storage controller manages the flow of data from host systems to DASDs. Host systems view the physical storage space as a partition of Logical Unit Numbers (LUNs). The hosts will submit input/output (I/O) commands to a particular LUN, and the storage controller will translate the target LUN to a physical storage area.
To avoid total system failure in the event that one system component fails, storage controller subsystems incorporate redundant hardware components. For instance, one typical prior art storage subsystem includes multiple storage controller processors to provide hosts multiple paths to the same DASD and LUNs. In the event that one storage controller path fails, the path to the other storage controller can be used to access the DASD.
In high end storage controllers, such as the International Business Machines Corporation (IBM) 3990 and Enterprise System Storage Server,** a host may send an input/output (I/O) command to any host or controller I/O adaptor in the subsystem and the I/O adaptor would then route the I/O to the controller handling the target LUN of that I/O operation. With such prior art high end systems, the host does not need to know the controller that is primarily managing a particular LUN because the controllers include the interface circuitry to route the I/O to the primary controller. Such solutions require expensive interface hardware that is not feasible for lower cost storage subsystems.
**Windows and NT are registered trademarks of Microsoft Corporation; AIX and OS/390 are registered trademarks of IBM and MVS and Fibre Channel Raid Storage Controller are trademarks of IBM. 
Lower cost storage subsystems also use two controllers, such as Small Computer System Interface (SCSI) or Fibre Channel controllers, that provide separate paths to the same DASD. However, such systems do not include the interface circuitry and added ports used in the higher end controllers that allow the controllers to route I/Os between the controllers. Instead, with the lower cost storage subsystems, the host will select a path to a storage controller for the I/O operation and could alternate between controllers to reach the LUN. The problem with this solution in the lower cost models is that the storage controllers need to communicate to coordinate the execution of I/O operations against the same LUN to ensure that data consistency is maintained, i.e., a controller with a later instance of data does not write to the same storage location as the other controller which includes an earlier instance of the data. Such cross-controller communications use high latency communication paths to coordinate I/O operations. These coordination activities can introduce significant overhead into the I/O execution process and adversely affect the response time for all I/O operations in the subsystem.
Thus, there is a need in the art for an improved mechanism for selecting the appropriate I/O path that reduces system overhead in processing I/O commands and provides for a failover and failback in the event of a failure along the path to one of the controllers.
To overcome the limitations in the prior art described above, preferred embodiments disclose a method, system, program, and data structure for selecting a path to one of at least two controllers. Each controller is capable of providing access to storage areas, such as Logical Unit Numbers (LUNs). Path information is received from the controllers indicating a preferred controller to use to access each storage area. An input/output (I/O) command directed to a target storage area is processed and the I/O command is directed to the controller indicated in the path information as the preferred controller for the target storage area. The controller receiving the I/O command executes the I/O command against the target storage area. In preferred embodiments, the path information to the storage controllers providing access to the storage areas is encoded with information designating one controller as the preferred controller and another as a non-preferred controller. The encoded path information is returned to a requesting computer. The requesting computer initially sends an input/output (I/O) command to the preferred controller and sends the I/O command to the non-preferred controller if the preferred controller cannot execute the I/O command.
Still further, the received path information indicates at least one non-preferred controller to use to access each storage area. The I/O command is directed to one non-preferred controller indicated in the path information for the target storage area if the I/O command directed to the preferred controller fails to complete execution.
In preferred embodiments, the path information from at least one host system to at least two storage controllers providing access to the storage areas is encoded with information designating one controller as a preferred controller and another as a non-preferred controller. The encoded path information is returned to a requesting computer. The requesting computer initially sends an input/output (I/O) command to the preferred controller and sends the I/O command to the non-preferred controller if the preferred controller cannot execute the I/O command.
Still further, when encoding the path information, the designation of one controller as the preferred controller is performed in a manner that balances an I/O workload between the controllers.
Preferred embodiments provide a technique that instructs host systems, such as servers or any other computing system, to direct I/O commands to a target storage area, such as a LUN, to one controller that is designated as the preferred controller. This ensures that I/O commands for a storage area are not directed to both controllers, which could result in delays in processing I/O commands because of the need for the controllers to coordinate the separate execution of I/O commands against the same storage area or LUN. Preferred embodiments further provide a non-preferred controller to use in the event that the connection to the preferred controller is not functioning. Thus, preferred embodiments provide a technique for selecting a controller and path to use for an I/O command that minimizes I/O processing at the controllers and provides for a controller to use during failover if one controller fails.
In preferred embodiments, the designation of the preferred and non-preferred status occurs at the storage controller level, where load balancing considerations can be taken into account in designating a controller as a preferred or non-preferred controller for a storage area.